home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games of Daze
/
Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso
/
x2ftp
/
msdos
/
convert
/
coolview
/
view50_1.asm
< prev
next >
Wrap
Assembly Source File
|
1995-03-05
|
2KB
|
73 lines
; View 50-lines screen in Text Mode
; Coded '95 by Paradise, 1995.III.3
; Lublin, Poland
; paradise@bachus.umcs.lublin.pl
;
; Example : Load bin screen from file
;
; Need : external file called 'FName' as 8000bytes bin file
;
; Compile : tasm view50_1.asm
; tlink /t view50_1.obj
;
Code SEGMENT PARA PUBLIC 'CODE'
ASSUME CS:Code, DS:Code
Org 100h
Body PROC FAR
; set 400 scan lines
mov ax, 1202h
mov bl, 30h
int 10h
; set text mode
mov ax, 3h
int 10h
; load 8x8 font
mov ax, 1112h
mov bl, 0
int 10h
; open file - only for reading
mov dx, offset FName
mov ax, 3d02h
int 21h
jnc noerror
; if error then show message, close file end exit
mov dx, offset FErr
mov ah, 9
int 21h
jmp fclose
noerror:
mov bx, ax
; seek to start of file
xor cx, cx
xor dx, dx
mov ax, 4200h
int 21h
; load screen from file
mov dx, 0b800h
mov ds, dx
xor dx, dx
mov cx, 8000
mov ax, 3f00h
int 21h
fclose:
; close file
mov ah, 3eh
int 21h
; wait for keypressed
mov ah, 0
int 16h
; set 25-lines mode
mov ax, 3h
int 10h
; return to dos
mov ah, 4ch
int 21h
Body ENDP
FName db 'coolview.bin',0
FErr db 'Error loading file.',13,10,'$'
Code ENDS
END Body